'''
Created on Aug 25, 2011

@author: david
'''

from pspy.gae.actiondomain import PspyAction

class Home(PspyAction):
    """
    Default Action 
    spawns index.gen
    """
    def execute(self):
        from app.Ranger.agents import AppAgent
        req = self.request
        nxtPage = "/Ranger/Home.gen"
        
        req.setAttribute("acct",req.session['acct'])
        req.setAttribute("dealers", AppAgent().getDealers())
        req.setAttribute("results","200::Ok")
        req.setResponsePage(nxtPage)        
        
        return req.getResponse()
    
    def sess_check(self):
        return True